﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Text.RegularExpressions;
using System.ComponentModel.DataAnnotations;
using LOMBARDISPICK.Model;

namespace LOMBARDISPICK.Model
{
	public class validationMetadata
	{
	}

	//[Required]
	//[Display(Name="Product Number")]

	//[StringLength(50)]
	//[Range(typeof(Decimal),"5", "5000")]
	//[Range(5, 50)]

	//[RegularExpression(@"^[a-zA-Z''-'\s]{1,40}$", ErrorMessage="Numbers and special characters are not allowed in the last name.")]

	//[DataType(DataType.EmailAddress)]
	//[DataType(DataType.MultilineText)]
	//Custom 	    Represents a data type that is not one of the known types.
	//DateTime 	    Represents an instant in time, expressed as a date and time of day.
	//Date 	        Represents a data value.
	//Time 	        Represents a time value.
	//Duration 	    Represents a continuous time during which an object exists.
	//PhoneNumber 	Represents a phone number value.
	//Currency 	    Represents a currency value.
	//Text 	        Represents text that is displayed.
	//Html 	        Represents an HTML file.
	//MultilineText Represents multiline text.
	//EmailAddress 	Represents an e-mail address.
	//Password 	    Represents a password value.
	//Url 	        Represents a URL value.
	//ImageUrl 	    Represents a URL value that is displayed as an image instead of text.


	

	[MetadataType(typeof(LPCoefficientMetadata))]
	public partial class LPCoefficient
	{
		// Note this class has nothing in it.  It's just here to add the class-level attribute.
	}

	//COMPUTER
	public class LPCoefficientMetadata
	{
		//Season
		[Display(Name = "Year To Calculate")]
		[Required]
		public Int32 YearToCalculate { get; set; }

		//Team
		[Display(Name = "Team")]
		[Required]
		public Int32 NFLTeamsID { get; set; }

		//Points Per Game Offense
		[Display(Name = "Points Per Game Offense")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 999.000, ErrorMessage = "Points Per Game Offense must be between 0 and 999.")]
		public decimal PointsPerGameOffense { get; set; }

		//Points Per Game Defense
		[Display(Name = "Points Per Game Defense")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 999.000, ErrorMessage = "Points Per Game Defense must be between 0 and 999.")]
		public decimal PointsPerGameDefense { get; set; }
		
		//TimeOfPosession
		[Display(Name = "Time Of Posession")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]	
		[Range(0.000, 60.000, ErrorMessage = "Time of Possession must be between 0 minutes and 60 minutes.")]
		public decimal TimeOfPosession { get; set; }

		//ThirdDownPercentage
		[Display(Name = "Third Down Percentage")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 100.000, ErrorMessage = "Third Down Percentage must be between 0% and 100%.")]
		public decimal ThirdDownPercentage { get; set; }

		//FourthDownPercentage
		[Display(Name = "Fourth Down Percentage")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 100.000, ErrorMessage = "Fourth Down Percentage must be between 0% and 100%.")]
		public decimal FourthDownPercentage { get; set; }

		//PassingYardsPerAttempt
		[Display(Name = "Passing Yards Per Attempt")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 100.000, ErrorMessage = "Passing Yards Per Attempt must be between 0 and 100.")]
		public decimal PassingYardsPerAttempt { get; set; }

		//PasserRating
		[Display(Name = "Passer Rating")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 158.3, ErrorMessage = "Passer Rating must be n 0 and 158.3.")]
		public decimal PasserRating { get; set; }

		//RedZoneConversions
		[Display(Name = "Red Zone Percentage Offense")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 100.000, ErrorMessage = "Red Zone Percentage Offense must be between 0% and 100%.")]
		public decimal redzonePercentageOffense { get; set; }

		//GoalToGoAttempts
		[Display(Name = "Red Zone Percentage Defense")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 100.000, ErrorMessage = "Red Zone Percentage Defense must be between 0% and 100%.")]
		public decimal redZonePercentageDefense { get; set; }
		//This is Red Zone Defense % and not GoalToGoAttempts

		//Penalties
		[Display(Name = "Penalties")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 5000.000, ErrorMessage = "Penalties must be between 0 and 5000.")]
		public decimal Penalties { get; set; }

		//PenaltyYards
		[Display(Name = "Penalty Yards")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 75000.000, ErrorMessage = "Penalty Yards must be between 0 and 75000.")]
		public decimal PenaltyYards { get; set; }

		//TimesSacked ??? WHAT IS THIS
		[Display(Name = "Times Sacked")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 199.000, ErrorMessage = "Number of times sacked must be between 0 and 199.")]
		public decimal TimesSacked { get; set; }

		//TimesSackedYards
		[Display(Name = "Times Sacked Yards")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 9999.000, ErrorMessage = "Number of yards lost from being sacked must be between 0 and 9999.")]
		public decimal TimesSackedYards { get; set; }

		//QuarterbackHits  ??? What category is this?
		[Display(Name = "Quarterback Hits")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 999.000, ErrorMessage = "Number of times Quarterback was hit")]
		public decimal QuarterbackHits { get; set; }

		//TurnoverDifferential
		[Display(Name = "Turnover Differential")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(-999.000, 999.000, ErrorMessage = "Turnover Differntial must be between -999 and 999")]
		public decimal TurnoverDifferential { get; set; }

		//OpponentTimeOfPosession
		[Display(Name = "Opponent Time Of Posession")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 60.000, ErrorMessage = "Opponent Average Time of Possession must be between 0 minutes and 60 minutes.")]
		public decimal OpponentTimeOfPosession { get; set; }

		//OpponentPassingYardsPerAttempt
		[Display(Name = "Opponent Passing Yards Per Attempt")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 100.000, ErrorMessage = "Opponent Passing Yards Per Attempt must be between 0 minutes and 100 yards.")]
		public decimal OpponentPassingYardsPerAttempt { get; set; }

		//OpponentPasserRating
		[Display(Name = "Opponent Passer Rating")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 158.3, ErrorMessage = "Opponent Passer Rating Average must be between 0 and 158.3 yards.")]
		public decimal OpponentPasserRating { get; set; }

		//OpponentThirdDownPercentage
		[Display(Name = "Opponent's Third Down Conversion Percentage")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 100.0, ErrorMessage = "Opponent Third Down Conversion Average must be between 0 and 100 percent.")]
		public decimal OpponentThirdDownPercentage { get; set; }

		//OpponentFourthDownPercentage
		[Display(Name = "Opponent's Fourth Down Conversion Percentage")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 100.0, ErrorMessage = "Opponent Third Down Conversion Average must be between 0 and 100 percent.")]
		public decimal OpponentFourthDownPercentage { get; set; }

		//OpponentPenalties
		[Display(Name = "Opponent Penalties")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 999.0, ErrorMessage = "Opponent Penalties per game average must be between 0 and 999")]
		public decimal OpponentPenalties { get; set; }

		//OpponentPenaltyYards
		[Display(Name = "Opponent Penalty Yards")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 9999.0, ErrorMessage = "Opponent Penalty yards per game average must be between 0 and 9999")]
        public decimal OpponentPenaltyYards { get; set; }

		//OpponentTimesSacked
		[Display(Name = "Opponent Times Sacked")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 99.0, ErrorMessage = "Opponent Times Sacked per game average must be between 0 and 99")]
		public decimal OpponentTimesSacked { get; set; }

		//OpponentTimesSackedYards
		[Display(Name = "Opponent Times Sacked Yards")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 9999.0, ErrorMessage = "Opponent Times Sacked yards per game average must be between 0 and 9999")]
		public decimal OpponentTimesSackedYards { get; set; }

		//Punts
		[Display(Name = "Punts")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 999.000, ErrorMessage = "Punts per game average for your team must be between 0 and 999.")]
		public decimal Punts { get; set; }

		//OpponentPunts
		[Display(Name = "Opponent Punts")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
		[Range(0.000, 999.000, ErrorMessage = "Opponent Punts per game average must be between 0 and 999.")]
		public decimal OpponentPunts { get; set; }

		//OpponentTurnoverDifferential
		[Display(Name = "Opponent Turnover Differential")]
		[Required]
		[RegularExpression(@"[^,]*", ErrorMessage = "May not contain commas")]
        [Range(0.000, 199.000, ErrorMessage = "Opponent Turnover Differential must be between 0 and 199.")]
		public decimal OpponentTurnoverDifferential { get; set; }
	}
	
   

	[MetadataType(typeof(NFLTeamMetadata))]
	public partial class NFLTeam
	{
		// Note this class has nothing in it.  It's just here to add the class-level attribute.
	}

	// NFLTeam
	public class NFLTeamMetadata
	{
		[Display(Name = "NFL Teams")]
		public Int32 NFLTeamsID { get; set; }

		[Required(ErrorMessage = "Team Name is required.")]
		[Display(Name = "Team Name")]
		[StringLength(25, ErrorMessage = "Team Name may not be longer than 25 characters")]
		public String TeamName { get; set; }

		[Required(ErrorMessage = "Team Name Abbreviation is required.")]
		[Display(Name = "Team Name Abbreviation ")]
		[StringLength(3, ErrorMessage = "Team Name Abbreviation may not be longer than 3 characters")]
		public String TeamNameAbbreviations { get; set; }
	}

	[MetadataType(typeof(TeamSeason_1985_2011Metadata))]
	public partial class TeamSeason_1985_2011
	{
		// Note this class has nothing in it.  It's just here to add the class-level attribute.
	}

	//COMPUTER
	public class TeamSeason_1985_2011Metadata
	{
		//Season
		[Display(Name = "Season")]
		[Required]
		public Int32 Season { get; set; }

		//Team
		[Display(Name = "Team")]
		[Required]
		public Int32 NFLTeamsID { get; set; }

		//Score
		[Display(Name = "Score")]
		[Required]
		public Int32 Score { get; set; }

		//OpponentScore
		[Display(Name = "Opponent Score")]
		[Required]
		public Int32 OpponentScore { get; set; }

		//TimeOfPosession
		[Display(Name = "Time Of Posession")]
		[Required]
		public Int32 TimeOfPosession { get; set; }

		//Touchdowns
		[Display(Name = "Touchdowns")]
		[Required]
		public Int32 Touchdowns { get; set; }

		//RushingAttempts
		[Display(Name = "Rushing Attempts")]
		[Required]
		public Int32 RushingAttempts { get; set; }

		//PassingAttempts
		[Display(Name = "Passing Attempts")]
		[Required]
		public Int32 PassingAttempts { get; set; }

		//PassingYardsPerAttempt
		[Display(Name = "Passing Yards Per Attempt")]
		[Required]
		public Int32 PassingYardsPerAttempt { get; set; }

		//PasserRating
		[Display(Name = "Passer Rating")]
		[Required]
		public Int32 PasserRating { get; set; }

		//ThirdDownPercentage
		[Display(Name = "Third Down Percentage")]
		[Required]
		public Int32 ThirdDownPercentage { get; set; }

		//FourthDownPercentage
		[Display(Name = "Fourth Down Percentage")]
		[Required]
		public Int32 FourthDownPercentage { get; set; }

		//RedZoneAttempts
		[Display(Name = "Red Zone Attempts")]
		[Required]
		public Int32 RedZoneAttempts { get; set; }

		//RedZoneConversions
		[Display(Name = "Red Zone Conversions")]
		[Required]
		public Int32 RedZoneConversions { get; set; }

		//GoalToGoAttempts
		[Display(Name = "Goal To Go Attempts")]
		[Required]
		public Int32 GoalToGoAttempts { get; set; }

		//GoalToGoConversions
		[Display(Name = "Goal To Go Conversions")]
		[Required]
		public Int32 GoalToGoConversions { get; set; }

		//Penalties
		[Display(Name = "Penalties")]
		[Required]
		public Int32 Penalties { get; set; }

		//PenaltyYards
		[Display(Name = "Penalty Yards")]
		[Required]
		public Int32 PenaltyYards { get; set; }

		//TimesSacked
		[Display(Name = "Times Sacked")]
		[Required]
		public Int32 TimesSacked { get; set; }

		//TimesSackedYards
		[Display(Name = "Times Sacked Yards")]
		[Required]
		public Int32 TimesSackedYards { get; set; }

		//QuarterbackHits
		[Display(Name = "Quarterback Hits")]
		[Required]
		public Int32 QuarterbackHits { get; set; }

		//TurnoverDifferential
		[Display(Name = "Turnover Differential")]
		[Required]
		public Int32 TurnoverDifferential { get; set; }

		//OpponentTimeOfPosession
		[Display(Name = "Opponent Time Of Posession")]
		[Required]
		public Int32 OpponentTimeOfPosession { get; set; }

		//OpponentTouchdowns
		[Display(Name = "Opponent Touchdowns")]
		[Required]
		public Int32 OpponentTouchdowns { get; set; }

		//OpponentRushingAttempts
		[Display(Name = "Opponent Rushing Attempts")]
		[Required]
		public Int32 OpponentRushingAttempts { get; set; }

		//OpponentPassingAttempts
		[Display(Name = "Opponent Passing Attempts")]
		[Required]
		public Int32 OpponentPassingAttempts { get; set; }

		//OpponentPassingYardsPerAttempt
		[Display(Name = "Opponent Passing Yards Per Attempt")]
		[Required]
		public Int32 OpponentPassingYardsPerAttempt { get; set; }

		//OpponentPasserRating
		[Display(Name = "Opponent Passer Rating")]
		[Required]
		public Int32 OpponentPasserRating { get; set; }

		//OpponentThirdDownPercentage
		[Display(Name = "Opponent Third Down Percentage")]
		[Required]
		public Int32 OpponentThirdDownPercentage { get; set; }

		//OpponentFourthDownPercentage
		[Display(Name = "Opponent Fourth Down Percentage")]
		[Required]
		public Int32 OpponentFourthDownPercentage { get; set; }

		//OpponentRedZoneAttempts
		[Display(Name = "Opponent Red Zone Attempts")]
		[Required]
		public Int32 OpponentRedZoneAttempts { get; set; }

		//OpponentRedZoneConversions
		[Display(Name = "Opponent Red Zone Conversions")]
		[Required]
		public Int32 OpponentRedZoneConversions { get; set; }

		//OpponentGoalToGoAttempts
		[Display(Name = "Opponent Goal To Go Attempts")]
		[Required]
		public Int32 OpponentGoalToGoAttempts { get; set; }

		//OpponentGoalToGoConversions
		[Display(Name = "Opponent Goal To Go Conversions")]
		[Required]
		public Int32 OpponentGoalToGoConversions { get; set; }

		//OpponentPenalties
		[Display(Name = "Opponent Penalties")]
		[Required]
		public Int32 OpponentPenalties { get; set; }

		//OpponentPenaltyYards
		[Display(Name = "Opponent Penalty Yards")]
		[Required]
		public Int32 OpponentPenaltyYards { get; set; }

		//OpponentTimesSacked
		[Display(Name = "Opponent Times Sacked")]
		[Required]
		public Int32 OpponentTimesSacked { get; set; }

		//OpponentTimesSackedYards
		[Display(Name = "Opponent Times Sacked Yards")]
		[Required]
		public Int32 OpponentTimesSackedYards { get; set; }

		//Punts
		[Display(Name = "Punts")]
		[Required]
		public Int32 Punts { get; set; }

		//OpponentPunts
		[Display(Name = "Opponent Punts")]
		[Required]
		public Int32 OpponentPunts { get; set; }

		//OpponentTurnoverDifferential
		[Display(Name = "Opponent Turnover Differential")]
		[Required]
		public Int32 OpponentTurnoverDifferential { get; set; }
	}

}


//Season
//Team
//Score
//OpponentScore
//TimeOfPosession
//Touchdowns
//RushingAttempts
//PassingAttempts
//PassingYardsPerAttempt
//PasserRating
//ThirdDownPercentage
//FourthDownPercentage
//RedZoneAttempts
//RedZoneConversions
//GoalToGoAttempts
//GoalToGoConversions
//Penalties
//PenaltyYards
//TimesSacked
//TimesSackedYards
//QuarterbackHits
//TurnoverDifferential
//OpponentTimeOfPosession
//OpponentTouchdowns
//OpponentRushingAttempts
//OpponentPassingAttempts
//OpponentPassingYardsPerAttempt
//OpponentPasserRating
//OpponentThirdDownPercentage
//OpponentFourthDownPercentage
//OpponentRedZoneAttempts
//OpponentRedZoneConversions
//OpponentGoalToGoAttempts
//OpponentGoalToGoConversions
//OpponentPenalties
//OpponentPenaltyYards
//OpponentTimesSacked
//OpponentTimesSackedYards
//Punts
//OpponentPunts
//OpponentTurnoverDifferential